﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizzCore;

namespace BizzUI.UserControls
{
    public partial class AuditReport : UserControl
    {
        public AuditReport()
        {
            InitializeComponent();
            initReport();
        }

        private void initReport()
        {
            BizzSystem s = BizzSystem.getInstance();
            dataGridViewLogs.DataSource = s.getAuditLogs();
            dataGridViewLogs.RowHeadersVisible = false;
            
            foreach (DataGridViewColumn c in dataGridViewLogs.Columns)
            {
                c.Visible = false;
            }
            dataGridViewLogs.Columns["Date"].Visible = true;
            dataGridViewLogs.Columns["Date"].HeaderText = "Fecha";
            dataGridViewLogs.Columns["Date"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;

            
            dataGridViewLogs.Columns["Message"].Visible = true;
            dataGridViewLogs.Columns["Message"].HeaderText = "Acción realizada";
            dataGridViewLogs.Columns["Message"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;


        }
    }
}
